﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<select id="eventinfo" class="text" name="eventinfo">
    <option value="0">请选择</option>
    <%
        
        if (ViewData["EventInfo"] != null)
        {
            IList<EventInfo> eventInfos=eventInfos= ViewData["EventInfo"] as IList<EventInfo>;
            if(eventInfos!=null){
                foreach(var item in eventInfos){%>

                    <option value="<%= item.Id %>">
                    <%
                        int count= item.Root.Length-item.Root.Replace(".","").Length;
                        for (int i = 0; i < count; i++) {%>
                            &nbsp                        
                        <%}
                     
                    %>
                    <%:item.Name %></option>
                    
                <%}
            }
        }
        
    %>
</select>

<script type="text/javascript" charset="utf-8">
    $(function () {
        $("#eventinfo").val($("#eventid").val());
    });

</script>
